class SASPara(object):
    def __init__(self, type=None):
        if type == "yuanyang":
            # Henan Yuanyang
            self.alpha = 0.1  # affinity between pixels and superpixels
            self.beta = 30  # scale factor in superpixel affinity
            self.nb = 2  # number of neighbors for superpixels
            self.Nseg = 170  # number of final segmentation for 512 x 512
            self.polygonize_rdp_epsilon_patch = (
                5  # parameter of rdp in SNICPOLY in patch phase
            )
            self.polygonize_rdp_epsilon = (
                5  # parameter of rdp in SNICPOLY in urban mask phase
            )
        elif type == "xiangyang":
            # Hubei Xiangyang
            self.alpha = 1  # affinity between pixels and superpixels
            self.beta = 30  # scale factor in superpixel affinity
            self.nb = 1  # number of neighbors for superpixels
            self.Nseg = 250  # number of final segmentation for 512 x 512
            self.polygonize_rdp_epsilon_patch = (
                5  # parameter of rdp in SNICPOLY in patch phase
            )
            self.polygonize_rdp_epsilon = (
                5  # parameter of rdp in SNICPOLY in urban mask phase
            )
        elif type == "yuanyang_sr":
            # Henan Yuanyang SR
            self.alpha = 1  # affinity between pixels and superpixels
            self.beta = 30  # scale factor in superpixel affinity
            self.nb = 1  # number of neighbors for superpixels
            self.Nseg = 100  # number of final segmentation for 512 x 512
            self.polygonize_rdp_epsilon_patch = (
                5  # parameter of rdp in SNICPOLY in patch phase
            )
            self.polygonize_rdp_epsilon = (
                5  # parameter of rdp in SNICPOLY in urban mask phase
            )
        elif type == "fuyu_sr":
            # Heilongjiang Fuyu SR
            self.alpha = 1  # affinity between pixels and superpixels
            self.beta = 30  # scale factor in superpixel affinity
            self.nb = 1  # number of neighbors for superpixels
            self.Nseg = 100  # number of final segmentation for 512 x 512
            self.polygonize_rdp_epsilon_patch = (
                5  # parameter of rdp in SNICPOLY in patch phase
            )
            self.polygonize_rdp_epsilon = (
                5  # parameter of rdp in SNICPOLY in urban mask phase
            )
        elif type == "xiangyang_sr":
            # Hubei Xiangyang SR
            self.alpha = 1  # affinity between pixels and superpixels
            self.beta = 30  # scale factor in superpixel affinity
            self.nb = 1  # number of neighbors for superpixels
            self.Nseg = 100  # number of final segmentation for 512 x 512
            self.polygonize_rdp_epsilon_patch = (
                5  # parameter of rdp in SNICPOLY in patch phase
            )
            self.polygonize_rdp_epsilon = (
                5  # parameter of rdp in SNICPOLY in urban mask phase
            )
        elif type == "tiny":
            # Henan Yuanyang
            self.alpha = 0.1  # affinity between pixels and superpixels
            self.beta = 30  # scale factor in superpixel affinity
            self.nb = 2  # number of neighbors for superpixels
            self.Nseg = 500  # number of final segmentation for 512 x 512
            self.polygonize_rdp_epsilon_patch = (
                5  # parameter of rdp in SNICPOLY in patch phase
            )
            self.polygonize_rdp_epsilon = (
                5  # parameter of rdp in SNICPOLY in urban mask phase
            )
        else:
            # Default
            self.alpha = 0.01  # affinity between pixels and superpixels
            self.beta = 30  # scale factor in superpixel affinity
            self.nb = 2  # number of neighbors for superpixels
            self.Nseg = 140  # number of final segmentation for 512 x 512
            self.polygonize_rdp_epsilon_patch = (
                5  # parameter of rdp in SNICPOLY in patch phase
            )
            self.polygonize_rdp_epsilon = (
                5  # parameter of rdp in SNICPOLY in urban mask phase
            )

        self.Nseg_offset_a = (
            0.5  # for adjustment of Nseg in different patch_w and patch_h
        )
        self.Nseg_offset_b = (
            0.5  # for adjustment of Nseg in different patch_w and patch_h
        )
